Private Sub dsSocket1_Accept(Index As Integer, SocketID As Integer)
On Error Resume Next
If Index = 0 Then
intMax = intMax + 1
Load dsSocket1(intMax) 'load a new dssocket control
dsSocket1(intMax).TabStop = False
dsSocket1(intMax).Socket = SocketID
'accept the connection on the newly made control.
Text1 = Text1 & vbCrLf & "New User Joined" 'display status
'now we gotta send the user list to the new user
For i = 0 To List1.ListCount - 1
TimeOut 0.5
dsSocket1(intMax).Send = "_$u:" & List1.List(i)
TimeOut 0.1
Next i
End If
End Sub
Private Sub dsSocket1_Close(Index As Integer, ErrorCode As Integer, ErrorDesc As String)
If intMax = 1 Then
dsSocket1(1).Send = "ChatHOST: well, no one is in the room except you. you will not be able to send anymore text until we get someone else in here to see it. you see, talking to yourself is the first sign of madness. hehe"
'this just makes it so that if there is only one user
'left then they wont be able to chat.
End If
End Sub
Private Sub dsSocket1_Exception(Index As Integer, ErrorCode As Integer, ErrorDesc As String)
If X = 1 Then T$ = "did you know i say something exactly every 3 minutes? weird huh? hehe"
If X = 2 Then T$ = "this is a pretty cool multi-user chat example made by Jon Cromer"
If X = 3 Then T$ = "this example was written in under 30 minutes. that's pretty good for the server and client and all the rem statements in here."
If X = 4 Then T$ = "if you're seeing this.... and this isn't called chat net by Jon Cromer, then a lamer copied my form and said it was his. make fun of the person who sent you this cause they cant code. damn script kiddies."
If X = 5 Then T$ = "check out my website if ya got time. http://www.pure-elite.com/senate/main.htm"
If X = 6 Then T$ = "im a bot created to spice up this chat by Jon Cromer"